const _ = require('lodash')

function checkAge(min, age) {
  return age >= min;
}

const curried = _.curry(checkAge);

let checkAge18 = curried(18);
let checkAge20 = curried(20);

console.log(checkAge18(20)); // true
console.log(checkAge20(22)); // true